/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MTFPanel.java
 *
 * Created on 25-nov-2011, 9:55:31
 */
package DQE.GUI;
    // Variables declaration - do not modify
/**
 *
 * @author Física
 */
public class NNPSPanel extends javax.swing.JPanel {

    /** Creates new form MTFPanel */
    public NNPSPanel() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jLabel8 = new javax.swing.JLabel();
        jButton8 = new javax.swing.JButton();
        jButton9 = new javax.swing.JButton();
        lbPath = new javax.swing.JLabel();
        jToggleButton3 = new javax.swing.JToggleButton();
        btCalcular = new javax.swing.JButton();
        optionsPanel = new javax.swing.JPanel();
        checkAverage = new javax.swing.JCheckBox();
        radioAxial = new javax.swing.JRadioButton();
        radioRadial = new javax.swing.JRadioButton();
        checkAutoROI = new javax.swing.JCheckBox();
        lbRoiSize = new javax.swing.JLabel();
        checkTrend = new javax.swing.JCheckBox();
        lbEdgeAngle = new javax.swing.JLabel();
        txRoiInterior = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        txRoiOverlap = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        cbRotar = new javax.swing.JComboBox();
        jLabel6 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();

        buttonGroup1.add(radioAxial);
        buttonGroup1.add(radioRadial);

        setMaximumSize(new java.awt.Dimension(800, 500));
        setMinimumSize(new java.awt.Dimension(800, 500));
        setPreferredSize(new java.awt.Dimension(800, 500));

        jLabel8.setBackground(new java.awt.Color(102, 255, 51));
        jLabel8.setText("NPS Imagen 1/5");
        jLabel8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jLabel8.setOpaque(true);

        jButton8.setText("<");
        jButton8.setToolTipText("imagen siguiente");
        jButton8.setMargin(new java.awt.Insets(2, 2, 2, 2));
        jButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton8ActionPerformed(evt);
            }
        });

        jButton9.setText(">");
        jButton9.setToolTipText("Imagen anterior");
        jButton9.setMargin(new java.awt.Insets(2, 2, 2, 2));
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });

        lbPath.setBackground(new java.awt.Color(255, 255, 255));
        lbPath.setText("Path (n/N)");
        lbPath.setToolTipText("Nombre completo de la imagen");
        lbPath.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lbPath.setOpaque(true);

        jToggleButton3.setText("Zoom");
        jToggleButton3.setToolTipText("Zoom y movimiento de la imagen");
        jToggleButton3.setMargin(new java.awt.Insets(2, 2, 2, 2));

        btCalcular.setText("Calcular NPS");
        btCalcular.setToolTipText("Calcula las MTF");
        btCalcular.setMargin(new java.awt.Insets(2, 2, 2, 2));
        btCalcular.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btCalcularActionPerformed(evt);
            }
        });

        optionsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Opciones"));

        checkAverage.setSelected(true);
        checkAverage.setText("Promediar NPS de las distintas imágenes");
        checkAverage.setToolTipText("Define automáticamentela posición del borde");
        checkAverage.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                checkAverageActionPerformed(evt);
            }
        });

        radioAxial.setSelected(true);
        radioAxial.setText("Axial (±7 puntos en cada eje)");

        radioRadial.setText("Radial");

        checkAutoROI.setSelected(true);
        checkAutoROI.setText("Definición autom. de la ROI");
        checkAutoROI.setToolTipText("Define automáticamente el ROI");
        checkAutoROI.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                checkAutoROIActionPerformed(evt);
            }
        });

        lbRoiSize.setBackground(new java.awt.Color(255, 255, 255));
        lbRoiSize.setText("125 x 125 mm²");
        lbRoiSize.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lbRoiSize.setOpaque(true);

        checkTrend.setSelected(true);
        checkTrend.setText("Sustracción de tendencia");
        checkTrend.setToolTipText("Define automáticamentela posición del borde");
        checkTrend.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                checkTrendActionPerformed(evt);
            }
        });

        lbEdgeAngle.setBackground(new java.awt.Color(255, 255, 255));
        lbEdgeAngle.setText(" 3*VP²+5*VP+7");
        lbEdgeAngle.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lbEdgeAngle.setOpaque(true);

        txRoiInterior.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        txRoiInterior.setText("256");
        txRoiInterior.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jButton1.setText("Predeterminadas IEC");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jLabel3.setText(" Tamaño ROI interior");

        jLabel5.setText(" Solapamiento ROIs");

        txRoiOverlap.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        txRoiOverlap.setText("128");
        txRoiOverlap.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        txRoiOverlap.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txRoiOverlapActionPerformed(evt);
            }
        });

        jLabel4.setText(" Promedio NPS");

        cbRotar.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "RQR3", "RQR5", "RQR7", "RQR9" }));
        cbRotar.setSelectedItem("RQR5");

        jLabel6.setText("Calidad del haz");

        javax.swing.GroupLayout optionsPanelLayout = new javax.swing.GroupLayout(optionsPanel);
        optionsPanel.setLayout(optionsPanelLayout);
        optionsPanelLayout.setHorizontalGroup(
            optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(optionsPanelLayout.createSequentialGroup()
                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(optionsPanelLayout.createSequentialGroup()
                        .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(checkAutoROI)
                            .addGroup(optionsPanelLayout.createSequentialGroup()
                                .addGap(21, 21, 21)
                                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel5)
                                    .addComponent(jLabel3)))
                            .addComponent(checkTrend))
                        .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(optionsPanelLayout.createSequentialGroup()
                                .addGap(3, 3, 3)
                                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(txRoiInterior, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txRoiOverlap, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 45, Short.MAX_VALUE)))
                            .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, optionsPanelLayout.createSequentialGroup()
                                    .addGap(3, 3, 3)
                                    .addComponent(lbEdgeAngle, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, optionsPanelLayout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(lbRoiSize, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGroup(optionsPanelLayout.createSequentialGroup()
                        .addGap(21, 21, 21)
                        .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(radioRadial)
                            .addComponent(radioAxial)
                            .addComponent(jLabel4)))
                    .addComponent(checkAverage)
                    .addGroup(optionsPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbRotar, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, optionsPanelLayout.createSequentialGroup()
                .addContainerGap(138, Short.MAX_VALUE)
                .addComponent(jButton1)
                .addContainerGap())
        );
        optionsPanelLayout.setVerticalGroup(
            optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(optionsPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbRoiSize)
                    .addComponent(checkAutoROI))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txRoiInterior, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txRoiOverlap, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbEdgeAngle)
                    .addComponent(checkTrend))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(radioAxial)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(radioRadial)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(checkAverage)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(cbRotar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)
                .addComponent(jButton1)
                .addContainerGap())
        );

        jLabel1.setBackground(new java.awt.Color(255, 51, 51));
        jLabel1.setText("Info: Tam. pixel (fNy)");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(lbPath, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, 482, Short.MAX_VALUE))
                    .addComponent(jToggleButton3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(btCalcular)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jButton8)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jButton9))
                            .addComponent(optionsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(9, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbPath, javax.swing.GroupLayout.DEFAULT_SIZE, 20, Short.MAX_VALUE)
                    .addComponent(jButton8)
                    .addComponent(jButton9))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(optionsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 407, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btCalcular)
                    .addComponent(jToggleButton3))
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed

// TODO add your handling code here:}//GEN-LAST:event_jButton8ActionPerformed
    }
        private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed

// TODO add your handling code here:}//GEN-LAST:event_jButton9ActionPerformed
        }
        private void btCalcularActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btCalcularActionPerformed

// TODO add your handling code here:}//GEN-LAST:event_btCalcularActionPerformed
        }
private void checkAverageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkAverageActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_checkAverageActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jButton1ActionPerformed

private void checkAutoROIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkAutoROIActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_checkAutoROIActionPerformed

private void checkTrendActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkTrendActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_checkTrendActionPerformed

private void txRoiOverlapActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txRoiOverlapActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txRoiOverlapActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btCalcular;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JComboBox cbRotar;
    private javax.swing.JCheckBox checkAutoROI;
    private javax.swing.JCheckBox checkAverage;
    private javax.swing.JCheckBox checkTrend;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JToggleButton jToggleButton3;
    private javax.swing.JLabel lbEdgeAngle;
    private javax.swing.JLabel lbPath;
    private javax.swing.JLabel lbRoiSize;
    private javax.swing.JPanel optionsPanel;
    private javax.swing.JRadioButton radioAxial;
    private javax.swing.JRadioButton radioRadial;
    private javax.swing.JTextField txRoiInterior;
    private javax.swing.JTextField txRoiOverlap;
    // End of variables declaration//GEN-END:variables
}
